package top.codecrab.cloudalibaba.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import top.codecrab.cloudalibaba.mapper.StorageMapper;
import top.codecrab.cloudalibaba.service.StorageService;

import javax.annotation.Resource;

/**
 * @author codecrab
 * @since 2021年05月24日 9:46
 */
@Slf4j
@Service
public class StorageServiceImpl implements StorageService {

    @Resource
    private StorageMapper storageMapper;

    @Override
    public void decrease(Long productId, Integer count) {
        log.info("-------库存微服务扣减库存-------");
        storageMapper.decrease(productId, count);
    }
}
